// 导入组件
import Home from '@/pages/home'
import Layout from '@/pages/Layout'
import Login from '@/pages/Login'
import My from '@/pages/my'
import Question from '@/pages/question'
import Text from '@/pages/text'
import Video from '@/pages/video'
import Edit from '@/pages/my/Edit'
import Auth from './nav'
import Detail from '@/pages/detail'
import Search from '@/pages/Search'
import SearchResult from '@/pages/Search/Result'
export const routes = [
  {
    path: '/',
    element: <Layout></Layout>,
    children: [
      {
        path: '/',
        element: <Auth element={<Home></Home>}></Auth>,
      },
      {
        path: '/question',
        element: <Auth element={<Question></Question>}></Auth>,
      },
      {
        path: '/video',
        element: <Auth element={<Video></Video>}></Auth>,
      },
      {
        path: '/my',
        element: <Auth element={<My></My>}></Auth>,
      },
    ],
  },
  {
    path: '/login',
    element: <Login></Login>,
  },
  {
    path: '/search',
    element: <Search></Search>,
  },
  {
    path: '/search/Result',
    element: <SearchResult></SearchResult>,
  },
  {
    path: '/text',
    element: <Text></Text>,
  },
  {
    path: '/detail/:id',
    element: <Detail></Detail>,
  },
  {
    path: '/profile/edit',
    element: <Edit></Edit>,
  },
]
